var express = require('express');
const { addImgs, deleteimg } = require("../api/cinemas.js")
var router = express.Router();

/* GET home page. */
router.post('/addImgs', async function (req, res, next) {
   const data = await addImgs(req)
   res.send(data);
});

router.delete('/:_id/imgs/:url', async function (req, res, next) {
   const { url } = req.params;
   const data = await deleteimg(url);
   res.send(data);
});

module.exports = router;